<html lang="en">
<head>
 <meta charset="UTF-8">
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <meta http-equiv="X-UA-Compatible" content="ie=edge">
 <link rel="stylesheet" href="../public/css/node.css">
 <link rel="stylesheet" href="../public/css/bootstrap.min.css">
 <title>{{ animes.title }} 编辑</title>
</head>
<body >

  <ul id="nav" class="col-md-1 nav nav-pills nav-stacked">
    <li class="navItem txContainer col-md-12 col-xs-3 ">
      <div class="kb visible-lg visible-md"></div>
      <img src="../public/img/index/logo/logo.png" alt="" class="visible-lg-inline visible-md-inline">
      <div>后台管理</div>
    </li>
    {{each menu}}
    <li class="navItem col-md-12 col-xs-3"  data-area="{{$index + 1}}">{{ $value }}</li>
    {{/each}}
  </ul>

  <div id="animeTable" class="col-md-11">
      <div class="tableTitle">
        <a href="javascript:;" onclick="toRrefresh();"><span class="return"><img src="../public/img/index/other/back.png" alt=""></span></a>
        {{ animes.title }} 编辑
      </div>
      <div class="editMain">
        <form action="/node/editAnime/upload" method="post" enctype="multipart/form-data" class="saveImg" target="nm_iframe">
            <input accept="image/png, image/jpeg, image/gif, image/jpg" type="file" class="hide" id="imgInput" name="image" >
            <input accept="image/png, image/jpeg, image/gif, image/jpg" type="file" class="hide" id="imgInput_F" name="image_F">
            <input type="submit" value="保存上传" class="btn btn-info saveUpload hide">
        </form>
         
        <form class="main" action="/node/editAnime" method="post" target="nm_iframe">
        <div class="row part1">
          <div class="col-md-3 left">
              <div class="imgC">
                  <div class="imgSrc">
                    <img src="{{ animes.imgSrc }}"/>
                    <span class="noticeTitle">小图</span>
                    <input type="text" class="hide" name="imgSrc" id="imgInputText" value="{{ animes.imgSrc }}">
                    <span class="glyphicon glyphicon-remove returnImg return"></span>
                  </div>
              </div>
              <div class="imgC">
                <div class="imgSrc_F">
                  <img src="{{ animes.imgSrc_F }}"/>
                  <span class="noticeTitle">封面</span>
                  <input type="text" class="hide" name="imgSrc_F" id="imgInputText_F" value="{{ animes.imgSrc_F }}">
                  <span class="glyphicon glyphicon-remove returnImg return_F"></span>
                </div>
              </div>
          </div>
          <div class="col-md-9 right">
              <div class="form-group">
                  <label for="animeTitle">名称：</label>
                  <input type="text" name="title" class="form-control" id="animeTitle" placeholder="名称" value="{{animes.title}}">   
                </div>
                <div class="form-group">
                  <label for="animeId">前端ID：</label>
                  <input type="text" name="id" class="form-control" id="animeId" placeholder="ID" value="{{animes.id}}"> 
                </div>
                <div class="form-group">
                  <label for="animeId">后台ID：</label>
                  <input type="text" name="_id" readonly="readonly" class="form-control" id="anime_Id" placeholder="_ID" value="{{animes._id}}"> 
                </div>
                <div class="form-group">
                    <label for="animeId">热度：</label>
                    <input type="text" name="zValue" class="form-control" placeholder="热度值" value="{{animes.zValue}}"> 
                </div>
                <div class="form-group">
                  <label for="animeArea">地区：</label>
                  <select class="form-control" name="area" data-value="{{animes.area}}" id="areaSelect">
                    <option value="日本" >日本</option>
                    <option value="国创" >中国</option>
                    <option value="欧美" >欧美</option>
                  </select>
                  
                </div>
                <div class="form-group tags">
                  <label for="animeTags">标签：</label>
                  <textarea class="form-control" name="tags" id="tags" rows="1" readonly="readonly" placeholder="暂无标签">{{ animes.tags }}</textarea>
                  <div style="margin-top: 10px;" id="tags_list">
                    {{ each animes.tags }} 
                    <span class="tag" data-index="{{ $index }}">
                      {{ $value }}<span class="deleteTag deleteTag1">x</span>
                    </span>
                    {{ /each }}
                    <div class="tagInputC hide">
                      <input class="tag tagInput tagNew" placeholder="标签"></input>
                      <span id="closeAddTag" class="deleteTag">x</span>  
                    </div>                                 
                    <span class="addTag " id="addTag">+</span>
                    <span class="addTag hide" id="addTagOk">O</span>
                  </div>
                   
                </div>
                <div class="form-group">
                  <label for="animeDate">出版时间：</label>
                  <input type="number" name="year" class="form-control dateInput" id="animeYear" placeholder="年" value="{{animes.year}}"> 年  
                  <input type="number" name="month" class="form-control dateInput2" id="animeMonth" placeholder="月" value="{{animes.month}}"> 月
                  <input type="number" name="day" class="form-control dateInput2" id="animeDay" placeholder="日" value="{{animes.day}}"> 日
                </div>
                <div class="form-group">
                    <label for="animeUpdate">更新类型：</label>
                    <label class="radio1">
                      <input type="radio" name="update" id="optionsRadios1" value="0" {{ animes.update == 0 ? 'checked' : null }}>
                      已完结
                    </label>              
                    <label>
                      <input type="radio" name="update" id="optionsRadios2" value="1" {{ animes.update == 1 ? 'checked' : null }}>
                      连载中
                    </label>
                </div>
                <div class="form-group">
                    <label for="animeUpdateDate">更新日期：</label>
                    <input type="text" name="updateDate" class="form-control" id="animeDay" placeholder="更新日期" value="{{ animes.updateDate }}">
                </div>
                
              </div>
        </div>
        <div class="row" style="margin-top:20px">
          <div class="form-group">
              <label for="animeContent">内容简介：</label>
              <textarea class="form-control" name="content" id="content"rows="10" placeholder="请输入简介">{{ animes.content }}</textarea>
          </div>
          <div class="form-group">
            <label for="animeContent">下载链接：</label>
            <input type="text" class="form-control" name="panUrl" id="animePanUrl" placeholder="下载链接" value="{{ animes.panUrl }}">
          </div>
          <div class="form-group">
            <label for="animeEpisodes">分集管理：</label>
            <a href="/node/episodes?_id={{ animes._id }}"><span class="btn btn-info">操作</span></a>
            <input type="text" class="form-control episodesInput" name="episodes" id="animePanUrl" placeholder="暂无剧集" value="{{ animes.episodes }}">
            
          </div>
          <button style="margin-bottom:20px" data-id={{animes._id}} type="submit" class="btn btn-default save">保存</button>
        </div>
  
        </form>  
        <!--保存不跳转页面-->
        <iframe id="id_iframe" name="nm_iframe" style="display:none;"></iframe> 
      </div>
  </div> 


 
  
  
 <script src="../public/js/jquery-1.12.4.min.js"></script>
 <script src="../public/js/vue.min.js"></script>
 <script src="../public/js/vue-resource.min.js"></script>
 <script src="../public/js/common.js"></script>
 <script src="../public/js/node/index.js"></script>
</body>
</html>